package com.syh.jn.scm.domain.downstream.repository.purchase;

import cn.redscarf.commons.wrapper.Wrapper;
import com.syh.core.ddd.infrastructure.repository.AggregateRepository;
import com.syh.jn.scm.domain.downstream.entity.purchase.DownPurchaseOrder;
import com.syh.jn.scm.domain.downstream.entity.purchase.DownPurchaseOrderItem;
import com.syh.jn.scm.dto.downstream.purchase.DonwPurchaseStatisticalAmountVo;

import java.util.List;

/**
 * Date:2018/7/9
 * Author:Clown
 * Desc;
 */
public interface DownPurchaseOrderReadRepository extends AggregateRepository<DownPurchaseOrder, Long> {

    /**
     * 根据订单id获取明细
     *
     * @param id
     * @return
     */
    List<DownPurchaseOrderItem> getItemsByOrderId(Long id);

    DonwPurchaseStatisticalAmountVo statisticalAmount(Wrapper we);

    List<DonwPurchaseStatisticalAmountVo> statisticalAmountByMerchant(Wrapper we);

    List<DonwPurchaseStatisticalAmountVo> statisticalAmountByGoods(Wrapper we);
}
